package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@TableName(value = "account")
@NoArgsConstructor
public class Account {

    public Account(String name, Integer money, Long cardNo, String password) {
        this.name = name;
        this.money = money;
        this.cardNo = cardNo;
        this.password = password;
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("name")
    private String name;

    @TableField("money")
    private Integer money;

    @TableField("card_no")
    private Long cardNo;

    @TableField("password")
    private String password;

    @TableField("group_id")
    private String groupId;

}
